/**
 *
 */
module.exports = function(RED) {
    function configManager(n) {
        RED.nodes.createNode(this,n);
        var node = this;
        var validators = n.validators || [];
        var globalContext = this.context().global;
        var logger = globalContext.get("logger");
        if (logger) {
        	//node.log(configs);
            for (var i=0; i< validators.length; i+=1) {
            	var validator = validators[i];
            	var type = validator.type || "";
            	var opt = validator.opt || "";
            	var val = validator.val || "";


            }
        } else {
        	node.error("Error: Validator Must Has logger, Pelease Set Logger Into Global Context");
        }
    }
    RED.nodes.registerType("validator",configManager);
}